#coding=utf-8
from django.db import models

class TaobaoAccount(models.Model):
    taobao_id = models.CharField(max_length=100)
    name = models.CharField(max_length=100)

    state = models.CharField(max_length=100, default='')
    state = models.CharField(max_length=100, default='')
    city = models.CharField(max_length=100, default='')
    district = models.CharField(max_length=100, default='')
    address = models.CharField(max_length=500, default='')

    phone = models.CharField(max_length=50, default='')
    email = models.EmailField()

BROWSER_CHOICES = (
    ('firefox(火狐)', 'firefox'),
    ('ie6', 'ie6'),
    ('ie7', 'ie7'),
    ('ie8', 'ie8'),
    ('chrome', 'chrome'),
    ('360安全浏览器', '360'),
    ('遨游maxthon', 'maxthon'),
    ('opera', 'opera'),
    )
class ProxyUser(models.Model):
    tb = models.ForeignKey('TaobaoAccount', null=True, blank=True)
    
    taobao_id = models.CharField(max_length=100, default='')
    
    name = models.CharField(max_length=100, unique=True)
    password = models.CharField(max_length=100)
    
    is_vip = models.BooleanField(default=False)
    is_valid = models.BooleanField(default=True)
    
    start_at = models.DateTimeField(auto_now_add=True)
    end_at = models.DateTimeField(auto_now_add=True)
    
    browser = models.CharField(max_length=100, default='')
    
